// -----------------------------------------------------------------------------
// Generate By Furion Tools v1.6.0                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;

#nullable disable

namespace iemtm.WeChat.Core
{
    public partial class AreaStatData : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<AreaStatData, MasterDbContextLocator>
    {

        public DateTime? StatisTime { get; set; }
        public string AreaCode { get; set; }
        public string ParentCode { get; set; }
        public string AreaName { get; set; }
        public string ParentName { get; set; }
        public string Level { get; set; }
        public int? GenAmount { get; set; }
        public int? IdleAmount { get; set; }
        public int? GensetAmount { get; set; }
        public int? WaitGenAmount { get; set; }
        public int? MainsFailAmount { get; set; }
        public int? FSUAmount { get; set; }
        public int? AnnounceAmount { get; set; }
        public int? AnnouncedAmount { get; set; }
        public decimal? PowerGenerationRate { get; set; }
        public int? BattLowAmount { get; set; }
        public int? TotalNeedGen { get; set; }
        public int? AbnormalAmount { get; set; }
        public int? OutServiceAmount { get; set; }
    
        public void Configure(EntityTypeBuilder<AreaStatData> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.HasNoKey();

                entityBuilder.HasIndex(e => new { e.StatisTime, e.AreaCode }, "IX_AreaStatData");

                entityBuilder.Property(e => e.AreaCode).HasMaxLength(50);

                entityBuilder.Property(e => e.AreaName).HasMaxLength(50);

                entityBuilder.Property(e => e.Level).HasMaxLength(50);

                entityBuilder.Property(e => e.ParentCode).HasMaxLength(50);

                entityBuilder.Property(e => e.ParentName).HasMaxLength(50);

                entityBuilder.Property(e => e.PowerGenerationRate).HasColumnType("decimal(18, 2)");

                entityBuilder.Property(e => e.StatisTime).HasColumnType("datetime");
        }

    }
}

